<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>13.散点图案例+grid</title>
  </head>
  <body>
    <div
      id="box"
      style="width: 800px; height: 600px; border: 1px solid #f00"
    ></div>
    <script src="./echarts/echarts.min.js"></script>
    <script>
      // 1. 初始化对象
      const myChart = echarts.init(document.getElementById('box'));

      // 2. 根据参数来绘制图形
      myChart.setOption({
        xAxis: {},
        yAxis: {},
        tooltip: {},
        grid: {
          left: 50,
          top: 10,
          // bottom:10
          right: 10,
          height: '40%',
          width: '60%',
        },
        series: {
          type: 'scatter',
          data: [
            [13, 44],
            [51, 51],
            [66, 77],
            [33, 44],
            [67, 19],
            [25, 67],
          ],
        },
      });
    </script>
  </body>
</html>
